color functions
Functions that draw into grids do not change their color attributes. Only functions that explicitly set colors alter color attributes. A color argument of -1 means draw with the previously set colors.

The following functions convert colors between color formats, and get and set colors for a grid :

XgrConvertColorToRGB (color, @red, @green, @blue )
XgrConvertRGBToColor (red, green, blue, @color )
XgrGetBackgroundColor (grid, @color )
XgrGetBackgroundRGB (grid, @red, @green, @blue )
XgrGetDefaultColors (@back, @draw, @lo, @hi, @dull, @acc, @l, @h )
XgrGetDrawingColor (grid, @color )
XgrGetDrawingRGB (grid, @red, @green, @blue )
XgrGetGridColors (grid, @back, @draw, @lo, @hi, @dull, @acc, @l, @h )
XgrSetBackgroundColor (grid, color )
XgrSetBackgroundRGB (grid, red, green, blue )
XgrSetDefaultColors (back, draw, lo, hi, dull, acc, l, h )
XgrSetDrawingColor (grid, color )
XgrSetDrawingRGB (grid, red, green, blue )
XgrSetGridColors (grid, back, draw, lo, hi, dull, acc, l, h )

color
Graphics operations take an abbreviated color argument containing four 8-bit fields, one each for red,green,blue intensity, plus a standard colorNumber in the low byte. This argument is converted into internal RGB form as follows:

color = rgbc : 24-31 = r : 16-23 = g : 8-15 = b : 0-7 = colorNumber
color = 0 RGB = (0, 0, 0) = black
color = -1 RGB = current background or drawing color
colorNumber = 0 RGB = red << 24 : green << 16 : blue << 8
colorNumber < 124 RGB = from standard color[] array
colorNumber >= 124 RGB = reserved

The standard colorNumber is more than adequate for most applications. When accurate, high-quality color is needed, 8-bit per RGB is almost always sufficient. For the very highest quality image rendering, 8-bit per RGB is not quite sufficient, however.

16-bit per RGB is more than sufficient for the most demanding applications. 16-bit per RGB colors cannot be passed to drawing functions however. They must be set in advance by XgrSetBackgroundRGB() and/or XgrSetDrawingRGB() .

A -1 color argument tells drawing functions to clear or draw in the previously set background or drawing color. A -1 color argument tells color setting functions to leave the current value unchanged.

Functions that draw into grids do not change their color attributes. Only functions that explicitly set colors alter color attributes.